/*
 * @Author: HeAo
 * @Date: 2021-09-26 14:49:45
 * @LastEditTime: 2021-09-26 15:02:42
 * @LastEditors: HeAo
 * @Description:
 * @FilePath: \web2103-2105\web2105\3-1-ES6\day02\3-对象结构.js
 * 别乱动！
 */

let obj1 = {
  name: '张三',
  age: 12,
  gender: 'male'
}

let { name: username, age: userage, gender: usergender, hobby = ['篮球', '足球'] } = obj1
// console.log(username, userage, usergender, hobby);

// let obj2 = { p: ['Hello', { y: 'World' }] };
// let { p: [a, { y: b }] } = obj2
// console.log(a + b);

let obj3 = {
  name: '张三',
  age: 12,
  gender: '男'
}
let { ...obj4 } = obj3
console.log(obj4 === obj3);
